package com.luwak.controller.person;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.luwak.common.base.R;
import com.luwak.modules.person.entity.Person;
import com.luwak.modules.person.service.IPersonService;

/**
 * @author wanggang
 * @version V1.0
 * @Date 2018-3-27
 */
@Api(value = "个人信息controller", description = "个人信息生成", tags = {"个人信息生成"})
@RestController
public class PersonController {
	
	private Logger logger = LoggerFactory.getLogger(getClass());
	
	@Autowired
	private IPersonService personService;
	
	/**
     * 生成个人信息
     * wanggang
     * 2018-3-27
     */
    @ApiOperation("生成个人信息")
    @PostMapping("/person/info")
    public R personInfoShow() {
    	
    	Person p = null;
    	try {
			p = personService.createPerson();
		} catch (Exception e) {
			e.printStackTrace();
		}

        return R.ok("生成成功").put("data", p);
    }
	
}
